 function Wap = calc_wap(Hn,WN,Ap) %Busco cero por metodo de la secante
    W1 = 0;
    W2 = WN;
    Wap = WN;
    while abs(W1 - Wap) > 0.0001
        Wap = abs(W2 - (bode(Hn,W2)-10^(-Ap/20))/(bode(Hn,W2)-bode(Hn,W1))*(W2-W1));
        W1 = W2;
        W2 = Wap;
end